package br.com.engine.componentes;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;

import br.com.engine.Vector2;
import br.com.engine.controle.ControleBase;
import br.com.engine.interfaces.IComponent;

public class SpriteDebug implements IComponent 
{
	public  Vector2    position;
	public  int        width;
	public  int        height;
	private Graphics2D graphics; 
	
	public SpriteDebug( Vector2 position, int width, int height )
	{
		this( );
		
		this.position = position;
		this.width    = width;
		this.height   = height;
	}
	
	public SpriteDebug( )
	{
		this.graphics = ControleBase.getInstance( ).getGraphics2d( );	
	}

	@Override
	public void setup( )
	{
		
	}

	@Override
	public void draw( )
	{
		Graphics2D g = (Graphics2D)graphics.create( );
		g.setColor( Color.RED );
		g.draw    ( new Rectangle2D.Double( position.xp, position.xp, width, height ) );
		g.dispose( );
	}
}